<!DOCTYPE html>
<html lang="zh-Hans">
<head>
    <meta charset="UTF-8">
    <script type="text/javascript" src="static/jquery-easyui-1.5.5/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="static/jquery-easyui-1.5.5/themes/bootstrap/easyui.css">
    <link rel="stylesheet" type="text/css" href="static/jquery-easyui-1.5.5/themes/icon.css">
    <script type="text/javascript" src="static/jquery-easyui-1.5.5/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="static/jquery-easyui-1.5.5/locale/easyui-lang-zh_CN.js"></script>
    <script src="https://api.yum6.cn/yan.php?format=js"></script>
    <title>主页</title>
    <script type="text/javascript">

        $(function () {

            $("#tabs").tabs({

                fit: true,
                border: false
            });

            $("#nav").tree({
                url: "getNav",
                line: true
            });
            
            /* 点击一个a标签即新建一个tab */
            $("#aa a[tdo]").click(function() {
            	$("tabs").panel('refresh', src);
            	var src = $(this).attr("tdo");
            	var title = $(this).html();
            	/* 如果该tab已打开，则选中。否则新建一个tab */
            	if($("#tabs").tabs("exists", title)) {
            		$("#tabs").tabs("select", title);
            	} else {
            		$("#tabs").tabs("add",{    
                        title: title,
                        content: "<iframe scrolling='no' frameborder='0' src="+src+" style='width:100%;height:99%;'></iframe>",    
                        closable:true,
                        tools:[ ]    
                    });
            	}
				
			});

        });

    </script>
    <style type="text/css">
        .logo {
            width: 180px;
            height: 50px;
            line-height: 50px;
            text-align: center;
            font-size: 26px;
            font-weight: bold;
            float: left;
            color: #f8f8f8;
            margin-left: 20px;
        }
        .logout {
            float: right;
            padding: 15px 15px 0px 0px;
            color: #4b72a4;
        }

        .logout a {
            text-decoration: none;
        }

        .logout a:hover {
            text-decoration: underline;
            color: green;
        }
        
        /* 导航中的a标签 */
        #aa a[tdo]:hover {
            padding-left: 10%;
            margin: 20px;
            color: green;
            cursor:pointer;
            border-left: 3px solid;
        }
        
        #aa a[tdo] {
            font-size: 1.2em;
        }

    </style>
</head>

<body class="easyui-layout" style="margin: 0;">
<div data-options="region:'north',title:'图书管理系统',split:true, noheader: true" style="height: 60px; background: #D4D4D4;">

    <div class="logo">
        图书管理系统
    </div>
    <!-- <div style="height: 22px">你在颓废的时候别人都在努力哦~?</div> -->
    <div class="logout" style="font-size: 1.3em; margin-right: 20px">
        <span>您好，<span sec:authentication="principal.username">张三</span></span> | <a href="logout">注销</a>
    </div>
</div>
<div data-options="region:'south',title:'South Title',split:true, noheader: true" style="height: 35px; line-height: 30px; text-align: center">
    <!-- Copyright ©2002-2018 www.javajun.com All Rights Reserved JavaJun | 版权所有 -->
    <script>text()</script>
</div>
<!--<div data-options="region:'east',iconCls:'icon-reload',title:'East',split:true" style="width:100px;"></div>-->

<div data-options="region:'west', title:'导航',split:true, iconCls: 'icon-nav'" style="width:180px; /* padding: 10px */">

	<div id="aa" class="easyui-accordion" fit=true>
	    <div title="图书管理" data-options="iconCls:'icon-book',selected:true" style="padding:0px 0px 0px 24px;" sec:authorize="hasRole('ROLE_ADMIN')">   
	       <p><a tdo="book/manage">图书管理</a></p>
	    </div>
	    <div title="图书" data-options="iconCls:'icon-book',selected:true" style="padding:0px 0px 0px 24px;" sec:authorize="hasRole('ROLE_STUDENT')">   
	       <p><a tdo="book/show">所有图书</a></p>
	    </div>
	    <div title="图书" data-options="iconCls:'icon-book',selected:true" style="padding:0px 0px 0px 24px;" sec:authorize="hasRole('ROLE_TEACHER')">   
	       <p><a tdo="book/show">所有图书</a></p>
	    </div>
	     <div title="借阅管理" data-options="iconCls:'icon-filter'" style="padding:0px 0px 0px 24px;" sec:authorize="hasRole('ROLE_ADMIN')">
	       <p><a tdo="bookBorrow/audit">待审核</a></p>
	       <p><a tdo="bookBorrow/have">借阅中</a></p>
           <p><a tdo="bookBorrow/manage">借阅记录</a></p>
        </div>
	    <div title="用户管理" data-options="iconCls:'icon-man'" style="padding:0px 0px 0px 24px;" sec:authorize="hasRole('ROLE_ADMIN')">   
	        <p><a tdo="student/manage">学生管理</a></p>
	        <p><a tdo="teacher/manage">教师管理</a></p>
	    </div>
	    <div title="我的借阅" data-options="iconCls:'icon-filter'" style="padding:0px 0px 0px 24px;" sec:authorize="hasRole('ROLE_STUDENT')">   
	        <p><a tdo="bookBorrow/borrowAudit">待审核</a></p>
	        <p><a tdo="bookBorrow/borrowHave">借阅中</a></p>
	        <p><a tdo="bookBorrow/borrowManage">借阅记录</a></p>
	    </div>
	    <div title="我的借阅" data-options="iconCls:'icon-filter'" style="padding:0px 0px 0px 24px;" sec:authorize="hasRole('ROLE_TEACHER')">   
            <p><a tdo="bookBorrow/borrowAudit">待审核</a></p>
            <p><a tdo="bookBorrow/borrowHave">借阅中</a></p>
            <p><a tdo="bookBorrow/borrowManage">借阅记录</a></p>
        </div>
	    <div title="个人中心" data-options="iconCls:'icon-sum'" style="padding:0px 0px 0px 24px;">   
            <p><a tdo="user/manage">修改资料</a></p>
            <p><a tdo="user/editPassword">修改密码</a></p>
        </div>
	</div>  

</div>
<style>
    #startPage ul li {
        font-size: 2em;
    }
    #startPage ul li span{
        color: red;
    }
</style>
<div data-options="region: 'center'" style="padding:5px;background:#eee;">
    <div id="tabs">
        <div title="起始页" iconCls="icon-home" style="padding: 0px 20px;" id="startPage">
            <h1>你在颓废的时候别人都在努力哦~?</h1>
            <ul>
                <li>密码采用bcrypt算法进行加密</li>
                <li>自建图书API（通过ISBN编码查找图书）</li>
            </ul>
            <h1>图书API</h1>
            <ul>
                <li>通过API查找图书信息</li>
                
            </ul>
            <h1>关于书的图片</h1>
            <ul>
                <li>把微博当作图床，将书的照片上传到新浪微博</li>
            </ul>
            <h1>什么是ISBN</h1>
            <ul>
                <li>您可以将ISBN理解为图书的身份证号码</li>
                <li>您在录入的时候只需录入数字，不加任何连接符<br/>如：<span>9787302499480</span></li>
                <li><img alt="" src="https://gss2.bdstatic.com/9fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike60%2C5%2C5%2C60%2C20/sign=c76961b4e5dde711f3df4ba4c686a57e/faedab64034f78f0e53d4b4279310a55b3191c48.jpg"></li>
            </ul>
             <h1>关于账号</h1>
             <ul>
                <li>管理员默认账号、密码均为：<span>admin</span></li>
                <li>学生的用户名为<span>学号</span>，默认密码为：<span>1111</span></li>
                <li>老师的用户名为<span>邮箱</span>，默认密码为：<span>1111</span></li>
             </ul>
        </div>
    </div>
</div>
</body>
</html>